package com.api.devices.domain.query.score;

import com.alibaba.fastjson2.JSONObject;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.util.List;

@Data
public class RobotSocreQuery {
    private Long robotId;
    //    private String robotName;
    private JSONObject localRobotName;
    private List<ElementScoreQuery> children;

    public void setLocalRobotName(String localRobotName) {
        if (StringUtils.isNotBlank(localRobotName)) {
            this.localRobotName = JSONObject.parseObject(localRobotName);
        } else {
            this.localRobotName = null;
        }
    }
}
